home *** CD-ROM | disk | FTP | other *** search
/ Gold Medal Software 1 / Gold Medal Software Volume 1 (Gold Medal) (1994).iso / prog / tpwprog7.arj / STRDEMO1.PAS < prev    next >
Encoding:
Pascal/Delphi Source File  |  1992-07-02  |  997 b   |  35 lines

  1. { strdemo1.pas -- Using a DLL's import library unit }
  2.  
  3. program StrDemo1;
  4.  
  5. uses WinProcs, WinCrt, Strings, StrLib;
  6.  
  7. var
  8.  
  9.   Buffer: array[0 .. 80] of Char;
  10.   DeviceName, DriverName, OutputName, Next: PChar;
  11.   A: array[0 .. 40] of Char;
  12.  
  13. begin
  14.   GetProfileString('windows', 'device', ',,', Buffer, Sizeof(Buffer));
  15.   Writeln('Original string = ', Buffer);
  16.   Next := nil;
  17.   DeviceName := StrTok(Next, Buffer, ',');
  18.   DriverName := StrTok(Next, nil, ',');
  19.   OutputName := StrTok(Next, nil, ',');
  20.   Writeln('Device name = ', DeviceName);
  21.   Writeln('Driver name = ', DriverName);
  22.   Writeln('Output name = ', OutputName);
  23.   Writeln;
  24.   StrFill(A, '-', SizeOf(A));
  25.   Writeln('Filled A = ', A);
  26.   Writeln;
  27.   Writeln('Press Alt+F4 to close window')
  28. end.
  29.  
  30.  
  31. {--------------------------------------------------------------
  32.   Copyright (c) 1991 by Tom Swan. All rights reserved.
  33.   Revision 1.00    Date: 5/25/1991
  34. ---------------------------------------------------------------}
  35.